//
//  TestNetData.m
//  test
//
//  Created by kepuG on 17/1/17.
//  Copyright © 2017年 text. All rights reserved.
//

#import "TestNetData.h"
#import "CCNetWorkingTool.h"
#import "GQArkModel.h"


@implementation TestNetData


+(void)getDataUrl:(NSString *)url success:(CCSuccessBlock)success fail:(CCFailedBlock)fail{
    
    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
    parm[@"memberId"] = member_Id;

    [CCNetWorkingTool getWithPath:url params:parm success:^(id json,NSString *url) {
        
        
            NSMutableArray *muArr = [NSMutableArray array];
            NSArray *arr = json;
            if (arr.count > 0) {
                for (NSDictionary *dic in arr) {
                    GQArkModel *model = [GQArkModel mj_objectWithKeyValues:dic];
                    [muArr addObject:model];
                }
            }
            success(muArr);
        
        
    } failure:^(NSError *error,NSString *url) {
        
        
    }];
}

+(void)getTextUrl:(NSString*)url succell:(CCSuccessBlock)success fail:(CCFailedBlock)fail{
    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
    parm[@"memberId"] = member_Id;

    [CCNetWorkingTool getWithPath:url params:parm success:^(id json, NSString *url) {
        
        if (success) {
            success(json);
        }
        
    } failure:^(NSError *error, NSString *url) {
        
    }];
}


@end
